const path = require('path')

module.exports = {
  devServer: {
    port: 9999,
    open: true,
    proxy: {
      '/conner': {
        target: 'https://api.it120.cc',
        changeOrigin: true,
        pathRewrite: {
          '^/conner': '/conner'
        }
      }
    }
  },
  lintOnSave: false,
  chainWebpack: (config) => {
    config.resolve.alias
      .set('@', path.join(__dirname, 'src'))
      .set('@assets', path.join(__dirname, 'src/assets'))
      .set('@components', path.join(__dirname, 'src/components'))
      .set('@utils', path.join(__dirname, 'src/utils'))
      .set('@api', path.join(__dirname, 'src/api'))
      .set('@views', path.join(__dirname, 'src/views'))
      .set('@plugins', path.join(__dirname, 'src/plugins'))
  }
}
